const mongoose = require('mongoose')
const Schema = mongoose.Schema
const { name } = require('../public/javascripts/utils');
//  文章

const schema = new Schema({
  banner: { type: String, required: false }, // 公司横幅或Logo的URL
  name: { type: String, required: true }, // 公司名称
  title_cn: { type: String, required: true }, // 中文标题
  title_en: { type: String, required: true }, // 英文标题
  desc: { type: String, required: true }, // 描述
  createTime: { type: Date, default: Date.now }, // 创建时间
  updateTime: { type: Date, default: Date.now }, // 更新时间
  createUser: { type: Schema.Types.ObjectId, ref: 'users', required: true }, // 创建用户的唯一标识
  updateUser: { type: Schema.Types.ObjectId, ref: 'users', required: true }, // 更新用户的唯一标识
  status: { type: Number, default: 1 } // 状态，默认值为1，表示启用状态
});

module.exports = mongoose.model(name(__filename), schema)